package org.phalanx.messenging;

public class SessionLogOutMessage extends AbstractMessage {

	public SessionLogOutMessage(){
		this.messageHeader = "LOGOUT";
	}
	
	public void setIsLogOut(boolean isLoggingOut) {
		this.setToMessage("LOGOUT", isLoggingOut ? "Y" : "N");
	}
	
	public boolean getIsLogOut(){
		boolean isLoggedOut = false;
		
		if (this.getFromMessage("LOGOUT") != null){
			isLoggedOut = this.getFromMessage("LOGOUT").equals("Y") ? true : false;
		}
		
		return isLoggedOut;
	}
	
}
